package com.gwz.wxtime.openai.com.theokanning.openai;



import com.gwz.wxtime.openai.com.theokanning.openai.genImg.ImgRequest;
import com.gwz.wxtime.openai.com.theokanning.openai.genImg.ImgResponse;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.gwz.wxtime.openai.com.theokanning.openai.completion.*;

@FeignClient(name = "userService", url = "https://oneapi.xty.app",configuration = OPenAiConfig.class)
//@FeignClient(name = "userService", url = "http://gpt-api.tech",configuration = OPenAiConfig.class)
public interface OpenAiApi {




    @PostMapping("/v1/completions")
    CompletionResult createCompletion(@RequestBody CompletionRequest request);




    @PostMapping("/v1/images/generations")
    ImgResponse generationsImage(@RequestBody ImgRequest imgRequest);



    @PostMapping("/v1/chat/completions")
    CompletionResult createChatCompletion(@RequestBody ChatCompletionRequest request);


    @PostMapping("/send_message")
    CompletionResult createChatCompletionProxy(@RequestBody ChatCompletionRequest request);
}
